import openpyxl
import pytest
import requests


# data = [
#     {
#         "method": "post",
#         "url": "http://192.168.10.131:8888/api/private/v1/login",
#         "params": None,
#         "data": {"username": "admin", "password": "123456"},
#         "json": None,
#         "files": None,
#         "headers": None,
#     }
#
#
# ]
#
#
# class TestRunner:
#     @pytest.mark.parametrize("case", data)
#     def test_case(self, case):
#         res = requests.request(**case)
#         print(res.json())



# 数据源处理


# 打开excel文件
# workbook = openpyxl.load_workbook("utils/测试数据.xlsx")
#
# #选择表
# worksheet = workbook["Sheet1"]
# data =[]
# keys =[cell.value for cell in worksheet[2]]
# # print(keys
# for row in worksheet.iter_rows(min_row=3,values_only=True):
#    dict_data = dict(zip(keys,row))
#    print(dict_data)
#    data.append(dict_data)
#
# #关闭excel文件
# workbook.close()


S1 = "{'name': 'zhangsan', 'age': len('215426522')}"
print(S1, type(S1))
print(eval(S1), type(eval(S1)))












